package com.springmvc.entity;

import java.util.Deque;
import java.util.List;
import java.util.Map;

public class MJRoom {

	// 牌桌上剩余麻将
	private Deque<String> pondmj;
	// 当前出的牌
	private String playmj;
	// 出牌人
	private String playuserno;
	// 出牌人下一个人的id
	private String nextplayuserno;

	// 1胡 2杠对 3吃（前端判断计时状态）
	private String palytype;

	// 准备用户 key 1 2 3 4 value 用户id
	private Map<String, String> readyuserno;

	// 手中麻将
	private Map<String, List<String>> usermj;

	// 明牌麻将 key 1 2 3 4
	private Map<String, List<String>> usermmj;

	public Deque<String> getPondmj() {
		return pondmj;
	}

	public void setPondmj(Deque<String> pondmj) {
		this.pondmj = pondmj;
	}

	public String getPlaymj() {
		return playmj;
	}

	public void setPlaymj(String playmj) {
		this.playmj = playmj;
	}

	public String getPlayuserno() {
		return playuserno;
	}

	public void setPlayuserno(String playuserno) {
		this.playuserno = playuserno;
	}

	public String getNextplayuserno() {
		return nextplayuserno;
	}

	public void setNextplayuserno(String nextplayuserno) {
		this.nextplayuserno = nextplayuserno;
	}

	public String getPalytype() {
		return palytype;
	}

	public void setPalytype(String palytype) {
		this.palytype = palytype;
	}

	public Map<String, String> getReadyuserno() {
		return readyuserno;
	}

	public void setReadyuserno(Map<String, String> readyuserno) {
		this.readyuserno = readyuserno;
	}

	public Map<String, List<String>> getUsermj() {
		return usermj;
	}

	public void setUsermj(Map<String, List<String>> usermj) {
		this.usermj = usermj;
	}

	public Map<String, List<String>> getUsermmj() {
		return usermmj;
	}

	public void setUsermmj(Map<String, List<String>> usermmj) {
		this.usermmj = usermmj;
	}

	/**
	 * 查看后扣
	 * 
	 * @return
	 */
	public String houkou() {
		String mj = getPondmj().getLast();
		return mj;
	}

	/**
	 * 抓牌，获取下一张牌
	 * 
	 * @return
	 */
	public String nextMj() {
		String mj = getPondmj().removeFirst();
		return mj;
	}

	/**
	 * 删除最后一张牌
	 * 
	 * @return
	 */
	public String lastMj() {
		String mj = getPondmj().removeLast();
		return mj;
	}

}
